package com.finance.report.bean.pojo;

import com.finance.framework.lang.BaseObject;
import lombok.Data;

import java.math.BigDecimal;

/**
 * 供应商月报表数据bean
 */
@Data
public class SupplierSalary extends BaseObject {
    /**
     * 供货商编号
     */
    private String supplierCode;

    /**
     * 供货商名称
     */
    private String supplierName;

    /**
     * 月份 格式：2017-03
     */
    private String salaryMonth;

    /**
     * 首件单量
     */
    private Integer majorSum;

    /**
     * 拖件单量
     */
    private Integer minorSum;

    /**
     * 首件配费
     */
    private BigDecimal majorFee;

    /**
     * 拖件配费
     */
    private BigDecimal minorFee;

    /**
     * 总配费
     */
    private BigDecimal totalFee;


    @Override
    public boolean equals(Object object) {
        if (object instanceof SupplierSalary) {
            SupplierSalary supplierSalary = (SupplierSalary) object;
            return supplierSalary.getId().equals(super.getId());
        }
        return false;
    }

    @Override
    public int hashCode() {
        return this.getId().hashCode();
    }

}